package wineshop.service.Impl;

import java.util.List;

import wineshop.dao.DaoFactory;
import wineshop.dao.HotelDao;
import wineshop.domain.Hotel;
import wineshop.service.HotelService;

public class HotelServiceImpl implements HotelService {

	public void CreateHotel(Hotel hotel) {

		HotelDao hotelDao = (HotelDao) DaoFactory.GetDao("hotelDao");
		hotelDao.AddHotel(hotel);

	}

	public List<Hotel> GetAllHotel() {
		HotelDao hotelDao = (HotelDao) DaoFactory.GetDao("hotelDao");
		return hotelDao.GetAllHotel();

	}

	public Hotel GetHotelById(int hotelId) {
		HotelDao hotelDao = (HotelDao) DaoFactory.GetDao("hotelDao");
		return hotelDao.GetHotelById(hotelId);

	}

	public void UpdateHotel(Hotel hotel) {
		HotelDao hotelDao = (HotelDao) DaoFactory.GetDao("hotelDao");
		hotelDao.UpdateHotel(hotel);
	}
	
	public void DelHotel(int hotelId) {
		HotelDao hotelDao = (HotelDao) DaoFactory.GetDao("hotelDao");
		hotelDao.DelHotel(hotelId);
	}

}
